# -*- coding: utf-8 -*-
"""
Created on Tue Nov 15 09:12:25 2022

@author: YSL
"""
num=[0]*24
order=0

for i in range(1,5):
    for j in range(1,5):
        if j==i:
            continue
        for k in range(1,5):
            if k==i or k==j:
                continue
            for e in range(1,5):
                if e==i or e==j or e==k:
                    continue
                num[order]=i*1000+j*100+k*10+e
                order +=1
print("总共有%d种不同组合\n它们分别是：\n" % order)
for value in iter(num):
#for index,value in enumerate(num):
    print("%d\n" % value)
            